<template>
  <div class="root">
    <el-container class="root-container" direction="vertical">
      <!-- 头部 -->
      <My-header></My-header>

      <!-- 中部 -->
      <el-container>

        <!-- 侧边栏 -->
        <My-aside></My-aside>

        <!-- 主体部分 -->
        <el-main>
          <!-- 面包屑导航 -->
          <Breadcrumb />

          <!-- 路由占位符 -->
          <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
          </keep-alive>
          <router-view v-if="!$route.meta.keepAlive"></router-view>

        </el-main>
      </el-container>

      <!-- 底部 -->
      <My-footer></My-footer>
    </el-container>
  </div>
</template>

<script>
import Breadcrumb from "./Breadcrumb.vue";
import MyHeader from "./ElHeader.vue";
import MyAside from "./ElAside.vue"
import MyFooter from "./ElFooter.vue";

export default {
  name: "ElementUi",
  components: {
    Breadcrumb,
    MyHeader,
    MyAside,
    MyFooter,
  },
};
</script>
  
<style>
.el-header {
  background-color: rgb(55, 103, 215);
  height: 10px;
  color: white;
}

.el-header img {
  height: 40px;
  padding: 10px;
}

.el-header span {
  position: absolute;
  top: 19px;
  font-size: 25px;
}

.el-aside {
  background-color: #545c64;
  color: #333;
  text-align: center;
}

.el-main {
  background-color: #e9eef3;
  /* 字体颜色 */
  color: #333;
  /* text-align: center; */
  height: 580px;
}

.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 40px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>